<script type="text/javascript" charset="utf-8">
	lingcod.onShow(function(){
		$('td > a.no_lop_mpas_link').toggle( 
			function() {
				$('#summary_no_lop > #no_lop_mpas').show();
				$('#summary_no_lop > h2.no_lop_header').show();
			}, 
			function() {
				$('#summary_no_lop > #no_lop_mpas').hide();
				$('#summary_no_lop > h2.no_lop_header').hide();
			}
		);
	});
</script>

<table class="hab_repr_container">
	<tr>
		<th>LOP</th>
		<th># of MPAs</th>
		<th>Area (mi<sup>2</sup>)</th>
		<th>Percent of Study Region</th>
	</tr>
	{% for lop in lop_list|dictsort:'sort'  %}
	<tr class="{% cycle '' 'grey' %}">
		<td>
			{% if lop.lop|title = 'N/A' %}
				<a href="#" class="no_lop_mpas_link">{{lop.lop|title}}</a>
			{% else %}
				{{lop.lop|title}}
			{% endif %}
		</td>
		<td>{{lop.count}}</td>
		<td>{{lop.area|floatformat:"-2"}}</td>
		<td>{{lop.percent_of_sr|floatformat:"-2"}}%</td>
	</tr>
	{% endfor %}
</table>

{% if instance.unassigned_lop_opencoast_mpas %}
	<span id="summary_no_lop">
	<h2 class="no_lop_header" style="display: none;">MPAs with Unassigned LOP</h2>
	{% with instance.unassigned_lop_mpas as unassigned_mpas %}
		{% include "unassigned_lop_mpas_table.html" %}
	{% endwith %}
	</span>
{% endif %}